package com.djhu.freepartner.core;

public enum  Status {
    //统一成功状态
    SUCCESS(0,"OK"),

    //统一客户端异常状态
    BAD_REQUEST(10001,"无效请求"),

    NO_AUTHENTICATION(10002,"身份认证失败"),

    BAD_REQUEST_BODY(10003,"数据不符合规范"),

    MISSING_REQUEST_PARAM(10004,"缺少必须参数"),

    NO_PERMISSION(10005,"无权操作"),

    BAD_PARAM(10006,"参数校验失败"),

    NOT_FOUND(10007,"数据不存在"),

    BAD_URL(10008,"请求路径未找到"),

    REQUEST_METHOD_NOT_SUPPORT(10009,"请求方法不支持"),

    ALREADY_EXIST(10010,"数据已经存在"),

    MISSING_VERIFY_CODE(10011,"缺少验证码参数"),

    VERIFY_CODE_FAIL(10012,"验证码错误"),

    MEDIA_TYPE_NOT_SUPPORTED(10013,"不支持的媒体类型"),

    NOT_LOGGED_IN(10014,"未登录"),

    LOGIN_FAILD(10015,"账户名或者密码错误"),

    POST_IS_DISABLED(10016,"帖子被屏蔽"),

    ACCOUNT_NOT_FOUND(10020,"账户不存在"),

    ACCOUNT_IS_DISABLED(10017,"账户被禁用"),

    FILE_UPLOAD_ERROR(10020,"文件上传失败"),

    EMAIL_NOT_VERIFY(10018,"邮箱未验证"),

    INVOKE_FREQUENTLY(10021,"调用过于频繁"),

    LARGER_THAN_MAXPOST(10025,"超过每日发帖数"),

    ACCOUNT_NOT_FOUNDS(10017,"账户余额不足"),

    LARGER_THAN_MAXREAD(10026,"超过每日读帖子数"),

    //统一服务端异常状态
    SERVER_ERROR(10019,"服务器异常");

    private int code;
    private String desc;

    Status (int code,String desc){
        this.code = code;
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }
}
